﻿<%@ Page Language="C#" MasterPageFile="~/QuanTri/Manager.master" AutoEventWireup="true" CodeFile="QuanLyLop_HocSinh.aspx.cs" Inherits="QuanTri_QuanLyLop_HocSinh" Title="Untitled Page" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head1" Runat="Server">
    <link href="../CSS/FixItem.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" Runat="Server">
    <div style="width: 100%; height: auto;">
        <div id="main_panel" style="width: 100%;">
            <div id="personal_content" style="padding: 10px; border: 1px solid #ccc">
                <div class="personal_top_text">
                    Quản lý Lớp-Học sinh</div>
            </div>
            <div>
            <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
                <asp:TabContainer ID="TabContainer1" runat="server" Width="100%"
                    ActiveTabIndex="2" onactivetabchanged="TabContainer_ActiveTabChanged" 
                    AutoPostBack="True">
                 <asp:TabPanel ID="tab1" runat="server" HeaderText="Nhập từ Text"><ContentTemplate><div style="margin-top:20px;border:1 soild #cc;height:30px"><span style="margin-left:10px">Chọn năm </span>&nbsp <asp:DropDownList ID="ddlNam1" runat="server" Width="120px"></asp:DropDownList><span style="padding-left:50px">Chọn khối </span><asp:DropDownList ID="ddlKhoi1" AutoPostBack="True"
                    OnSelectedIndexChanged="ddlKhoi1_SelectedIndexChanged" 
        runat="server" Width="120px"></asp:DropDownList><span style="padding-left:50px">Chọn lớp </span><asp:DropDownList ID="ddlLop1" runat="server" AutoPostBack="True"
                    OnSelectedIndexChanged="ddlLop1_SelectedIndexChanged" 
        Width="120px"></asp:DropDownList>&nbsp Sĩ số: <asp:Label ID="lblSiSo" runat="server">
        </asp:Label></div><br /><br />
          <div style="margin-top:10px">
                <asp:GridView ID="grvDSHS" runat="server" AutoGenerateColumns="False" Width="100%"
                                AllowPaging="True" Height="28px" ShowFooter="True" 
                  onpageindexchanging="grvDSHS_PageIndexChanging" HorizontalAlign="Center">
                           <Columns>
                              <asp:TemplateField><ItemTemplate>
                                <asp:CheckBox ID="ckCheck" runat="server" />
                                  </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="STT">
                                  <ItemTemplate><center>
                                     <asp:Label ID="lblSTT" runat="server" Text='<%# Container.DataItemIndex + 1 %>'>
                                    </asp:Label></center>
                                  </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Tên học sinh">
                                  <ItemTemplate><center>
                                    <asp:Label runat="server" ID="lblMaHS" Text='<%#Bind("MaHS")%>' Visible="false">
                                    </asp:Label>
                                    <asp:TextBox runat="server" ID="txtTenHS" Text='<%#Bind("TenHS") %>' CssClass="textbox1">
                                    </asp:TextBox></center>
                                  </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Ngày sinh">
                                  <ItemTemplate><center>
                                    <asp:TextBox ID="txtNgaySinh" runat="server" CssClass="textbox1" Text='<%#Bind("NgaySinh") %>'>
                                    </asp:TextBox>
                                    <asp:CalendarExtender ID="cldNgaySinh" TargetControlID="txtNgaySinh" Format="dd/mm/yyyy" runat="server">
                                    </asp:CalendarExtender></center>
                                  </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Giới tính">
                                  <ItemTemplate><center>
                                   <asp:RadioButton ID="rdoNam" runat="server" Checked='<%#Bind("Nam") %>'/>Nam
                                   <asp:RadioButton ID="rdoNu" runat="server" Checked='<%#Bind("Nu") %>' />Nữ
                                  </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                 </asp:TemplateField>
                                 <asp:TemplateField HeaderText="Địa chỉ">
                                   <ItemTemplate><center>
                                    <asp:TextBox ID="txtDiaChi" CssClass="textbox1" runat="server" Text='<%#Bind("QueQuan") %>'>
                                    </asp:TextBox></center>
                                   </ItemTemplate>
                                     <ItemStyle HorizontalAlign="Center" />
                                 </asp:TemplateField>
                                 <asp:TemplateField HeaderText="Email">
                                   <ItemTemplate><center>
                                    <asp:TextBox ID="txtEmail" CssClass="textbox1" runat="server" Text='<%#Bind("Email") %>'>
                                    </asp:TextBox></center>
                                   </ItemTemplate>
                                     <ItemStyle HorizontalAlign="Center" />
                                 </asp:TemplateField>
                                 <asp:TemplateField HeaderText="Số ĐT" >
                                   <ItemTemplate><center>
                                     <asp:TextBox ID="txtSDT" CssClass="textbox1" runat="server" Text='<%#Bind("SDT") %>'>
                                     </asp:TextBox></center>
                                   </ItemTemplate>
                                     <ItemStyle HorizontalAlign="Center" />
                                 </asp:TemplateField>
                              </Columns>
                                <EditRowStyle HorizontalAlign="Center" />
                           <FooterStyle HorizontalAlign="Center" />
                                <HeaderStyle BackColor="#E4ECEF" Font-Bold="True" BorderColor="Blue" 
                               Height="30px" HorizontalAlign="Center" />
                                <PagerStyle BackColor="#E4ECEF" HorizontalAlign="Center" />
                           <RowStyle BackColor="#EFF3FB" HorizontalAlign="Center" />
                           <SortedAscendingHeaderStyle HorizontalAlign="Center" />
                           <SortedDescendingHeaderStyle HorizontalAlign="Center" />
                       </asp:GridView>
                      </div>
                      <div id="Div1" class="personal_submit clearfix" style="margin-left:150px">
                      <asp:LinkButton ID="lbtSua" CssClass="Link"  runat="server" 
                    Font-Underline="False" onclick="lbtSua_Click" > <img src="../images/update.png" style="border:0px;" />
                    <b>&nbsp;Sửa</b></asp:LinkButton>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
                    <asp:LinkButton ID="lbtXoa" CssClass="Link"  runat="server" 
                    Font-Underline="False"> <img src="../images/delete.png" style="border:0px;" /><b>&nbsp;Xóa</b>
                    </asp:LinkButton>&nbsp; &nbsp;&nbsp&nbsp&nbsp;&nbsp&nbsp <asp:LinkButton ID="lbtExcel" CssClass="Link" runat="server"
                          onclick="lbtExcel_Click1"><img src=../images/Excel-icon.png/><b>&nbsp;Xuất ra excel</b>
                          </asp:LinkButton>
                      </div><br /><br />
                            <div class="personal_style_form">
                            <span class="personal_laber">Họ và tên </span><asp:TextBox ID="txtHoTen" runat="server" Width="250px"></asp:TextBox><asp:Label ID="lblMaHS" runat="server" Visible="False"></asp:Label></div><div class="personal_style_form"><span class="personal_laber">Ngày sinh </span><asp:TextBox ID="txtNgaySinh" runat="server" Width="250px"></asp:TextBox><asp:CalendarExtender ID="cld1" TargetControlID="txtNgaySinh" runat="server" 
                                                  Enabled="True"></asp:CalendarExtender>
                              </div><div class="personal_style_form">
                              <span class="personal_laber">Giới tính </span>
                              <asp:RadioButton ID="rdoNam" GroupName="rdo" runat="server" />Nam&nbsp;&nbsp; 
                              <asp:RadioButton ID="rdoNu" GroupName="rdo" runat="server" />Nữ </div>
                              <div class="personal_style_form"><span class="personal_laber">Địa chỉ </span>
                              <asp:TextBox ID="txtDiaChi" runat="server" Width="250px"></asp:TextBox></div>
                              <div class="personal_style_form"><span class="personal_laber">Email </span>
                              <asp:TextBox ID="txtEmail" runat="server" Width="250px"></asp:TextBox></div>
                              <div class="personal_style_form"><span class="personal_laber">Số điện thoại </span>
                              <asp:TextBox ID="txtSDT" runat="server" Width="250px"></asp:TextBox></div>
                              <div style="text-align:center"><label runat="server" id="lblThongBao" style="color:Red;text-align:center" >
                              </label></div><div id="personalSubmit" class="personal_submit clearfix" style="margin-left:150px">
                              <asp:LinkButton runat="server" ID="lbtThem" CssClass="Link" onclick="lbtThem_Click">
                              <img src="../images/user.png" style="border:0px;"/><b>&nbsp;Thêm học sinh</b>
                              </asp:LinkButton>&nbsp&nbsp&nbsp&nbsp&nbsp;&nbsp&nbsp 
                              </div></ContentTemplate></asp:TabPanel>
                             <asp:TabPanel ID="tab2" runat="server" HeaderText="Nhập từ Excel"><ContentTemplate><br />
                             <div class="personal_style_form"><span style="margin-left:10px">Chọn năm </span><asp:DropDownList ID="ddlNam2" runat="server" Width="120px"></asp:DropDownList><span style="padding-left:50px">Chọn khối </span><asp:DropDownList ID="ddlKhoi2" runat="server" 
                           OnSelectedIndexChanged="ddlKhoi2_SelectedIndexChanged" Width="120px"></asp:DropDownList><span style="padding-left:50px">Chọn lớp </span><asp:DropDownList ID="ddlLop2" runat="server" Width="120px"></asp:DropDownList>&nbsp Sĩ số: <asp:Label ID="lblSS" runat="server"></asp:Label><br /><br /><span style="padding-left:15px">Đường dẫn </span><asp:FileUpload ID="fulExcel" runat="server"></asp:FileUpload>&nbsp;&nbsp;&nbsp;&nbsp; <asp:Button ID="btnNhapExcel" runat="server" BackColor="Gray" Height="25px" 
                           OnClick="btnNhapExcel_Click" Text="Nhập từ Excel" Width="100px"></asp:Button></div>
                           <div style="margin-top:10px">
                <asp:GridView ID="grvNhapExcel" runat="server" AutoGenerateColumns="False" Width="100%"
                                AllowPaging="True" Height="28px" ShowFooter="True"  HorizontalAlign="Center">
                           <Columns>
                              <asp:TemplateField><ItemTemplate>
                                <asp:CheckBox ID="ckCheck" runat="server" />
                                  </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="STT">
                                  <ItemTemplate><center>
                                     <asp:Label ID="lblSTT" runat="server" Text='<%# Container.DataItemIndex + 1 %>'>
                                    </asp:Label></center>
                                  </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Tên học sinh">
                                  <ItemTemplate><center>
                                    <asp:Label runat="server" ID="lblMaHS" Text='<%#Bind("MaHS")%>' Visible="false">
                                    </asp:Label>
                                    <asp:TextBox runat="server" ID="txtTenHS" Text='<%#Bind("TenHS") %>' CssClass="textbox1">
                                    </asp:TextBox></center>
                                  </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Ngày sinh">
                                  <ItemTemplate><center>
                                    <asp:TextBox ID="txtNgaySinh" runat="server" CssClass="textbox1" Text='<%#Bind("NgaySinh") %>'>
                                    </asp:TextBox>
                                    <asp:CalendarExtender ID="cldNgaySinh" TargetControlID="txtNgaySinh" Format="dd/mm/yyyy" runat="server">
                                    </asp:CalendarExtender></center>
                                  </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Giới tính">
                                  <ItemTemplate><center>
                                   <asp:RadioButton ID="rdoNam" runat="server" Checked='<%#Bind("Nam") %>'/>Nam
                                   <asp:RadioButton ID="rdoNu" runat="server" Checked='<%#Bind("Nu") %>' />Nữ
                                  </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                 </asp:TemplateField>
                                 <asp:TemplateField HeaderText="Địa chỉ">
                                   <ItemTemplate><center>
                                    <asp:TextBox ID="txtDiaChi" CssClass="textbox1" runat="server" Text='<%#Bind("QueQuan") %>'>
                                    </asp:TextBox></center>
                                   </ItemTemplate>
                                     <ItemStyle HorizontalAlign="Center" />
                                 </asp:TemplateField>
                                 <asp:TemplateField HeaderText="Email">
                                   <ItemTemplate><center>
                                    <asp:TextBox ID="txtEmail" CssClass="textbox1" runat="server" Text='<%#Bind("Email") %>'>
                                    </asp:TextBox></center>
                                   </ItemTemplate>
                                     <ItemStyle HorizontalAlign="Center" />
                                 </asp:TemplateField>
                                 <asp:TemplateField HeaderText="Số ĐT" >
                                   <ItemTemplate><center>
                                     <asp:TextBox ID="txtSDT" CssClass="textbox1" runat="server" Text='<%#Bind("SDT") %>'>
                                     </asp:TextBox></center>
                                   </ItemTemplate>
                                     <ItemStyle HorizontalAlign="Center" />
                                 </asp:TemplateField>
                              </Columns>
                                <EditRowStyle HorizontalAlign="Center" />
                           <FooterStyle HorizontalAlign="Center" />
                                <HeaderStyle BackColor="#E4ECEF" Font-Bold="True" BorderColor="Blue" 
                               Height="30px" HorizontalAlign="Center" />
                                <PagerStyle BackColor="#E4ECEF" HorizontalAlign="Center" />
                           <RowStyle BackColor="#EFF3FB" HorizontalAlign="Center" />
                           <SortedAscendingHeaderStyle HorizontalAlign="Center" />
                           <SortedDescendingHeaderStyle HorizontalAlign="Center" />
                       </asp:GridView>
                      </div>
                           <div style="padding-left: 210px; padding-top: 10px"><asp:LinkButton ID="lbtUD" 
                                   CssClass="Link"  runat="server" 
                    Font-Underline="False" onclick="lbtUD_Click"> <img src="../images/update.png" style="border:0px;" /><b>&nbsp;Sửa</b></asp:LinkButton>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<asp:LinkButton 
                                   ID="lbtDL" CssClass="Link"  runat="server" 
                    Font-Underline="False" onclick="lbtDL_Click"> <img src="../images/delete.png" style="border:0px;" /><b>&nbsp;Xóa</b></asp:LinkButton>&nbsp; &nbsp;&nbsp&nbsp&nbsp;&nbsp&nbsp <asp:LinkButton ID="lbtex" CssClass="Link" runat="server" 
                         onclick="lbtex_Click">
                      <img src=../images/Excel-icon.png/><b>&nbsp;Xuất ra excel</b>
                      </asp:LinkButton></div></ContentTemplate></asp:TabPanel>
                 <asp:TabPanel ID="tab3" runat="server" HeaderText="Chuyể
                 n HS lên lớp"><HeaderTemplate>Chuyển HS lên lớp</HeaderTemplate><ContentTemplate>
                        <div style="float:left;width:100%">
        <div style="border:solid 1px #686; float:left; width:430px;height:auto; margin-top:5px;">
          <div style="text-align:center;font-size:14px;color:blue ;padding:5px">Thông tin lớp cũ</div>
            <table style="width:100%;border:0px none none">
            <tr>
            <td colspan="2">&nbsp;</td>
            </tr> 
                 <tr>
                    <td style="margin-left:10px;padding-right:15px;float:right;padding-top:20px">
                       Năm học:
                         </td>
                      <td>
                        <asp:DropDownList runat="server" ID="ddlNamCu" Width="150px">
                        
                        </asp:DropDownList>
                      </td>
                </tr>
                <tr>
                 <td style="margin-left:10px;padding-right:15px;float:right;padding-top:20px">
                  Khối học:
                 </td>
                 <td> 
                   <asp:DropDownList runat="server" ID="ddlKhoiCu" Width="150px">
                    
                   </asp:DropDownList>
                 </td>
                </tr>
                 <tr>
                 <td style="margin-left:10px;padding-right:15px;float:right;padding-top:20px">
                  Lớp học:
                 </td>
                 <td> 
                   <asp:DropDownList runat="server" ID="ddlLopCu" Width="150px">
                    
                   </asp:DropDownList>
                 </td>
                </tr>
                <tr><td colspan="2">&nbsp</td></tr>
                  <tr>
                   <td colspan="2" style="border:0px none none"><asp:CheckBox ID="ckChonTatCa" runat="server" />Chọn hết
                   </td>
                  </tr>
                <tr>
                    <td colspan="2" style="border-top:none 0px none;">
                     <asp:GridView ID="grvHSCu" runat="server"  AutoGenerateColumns="False" 
                      Width="100%" AllowPaging="True"
                     ForeColor="#333333">
                    <RowStyle BackColor="#EFF3FB" />
                    <Columns>
                         <asp:TemplateField>
                           <ItemTemplate>
                           <center>
                             <asp:CheckBox ID="ckChon" runat="server" /></center>
                           </ItemTemplate>
                         </asp:TemplateField>
                         <asp:TemplateField HeaderText="STT">
                         <ItemTemplate><center><%# Container.DataItemIndex + 1 %></center> </ItemTemplate>
                         </asp:TemplateField>
                         <asp:TemplateField HeaderText="Tên học sinh">
                         <ItemTemplate><asp:Label runat="server" ID="lblMaHS" Visible="false" Text='<%#Bind("MaHS")%>'>
                         </asp:Label>
                         <%#Eval("TenHS") %>
                         </ItemTemplate>
                         </asp:TemplateField>
                    </Columns>
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                </asp:GridView>
                    </td>
                    </tr> 
            </table>
        </div>
        <div  style=" float:left; width:105px;height:auto; margin:100px auto auto">
            
            <table style="margin-top:200px;margin-left:40px">
                <tr>
                    <td><asp:LinkButton ID="lbtChuyen" CssClass="Link" runat="server">
                      <img  src="../images/gos-icons.png" alt="Chuyển HS"/></asp:LinkButton>
                    </td>
                </tr><tr><td colspan="2">&nbsp</td></tr>
                <tr><td colspan="2">&nbsp</td></tr>
                <tr>
                    <td><asp:LinkButton ID="lbtHuy" CssClass="Link" runat="server">
                      <img  src="../images/Back-icons.png" alt="Hủy chuyển"/></asp:LinkButton></td>
                </tr>
            </table> 
        </div>
        <div style="border:solid 1px #333333;float:left;margin-left:30px; width:430px;height:auto; margin-top:5px;">
            <div style="text-align:center;font-size:14px;color:Blue; padding:5px">Thông tin lớp mới</div>
            <table style="width:100%">
                <tr>
                   <td colspan="2">&nbsp;</td>
                <tr>
                    <td style="margin-left:10px;padding-right:15px;float:right;padding-top:20px">Năm học:</td>
                    <td>
                        <asp:DropDownList ID="ddlNamMoi" Width="150px" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                 <tr>
                    <td style="margin-left:10px;padding-right:15px;float:right;padding-top:20px">Khối học:</td>
                    <td>
                        <asp:DropDownList ID="ddlKhoiMoi" Width="150px" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                 <tr>
                    <td style="margin-left:10px;padding-right:15px;float:right;padding-top:20px">Lớp học:</td>
                    <td>
                        <asp:DropDownList ID="ddlLopMoi" Width="150px" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr><td colspan="2">&nbsp</td></tr>
                  <tr>
                   <td><asp:CheckBox ID="Xoa" runat="server"/>Chọn hết
                   </td>
                   <td align="right">
                      <asp:LinkButton ID="lbtExe" CssClass="Link" runat="server">
                      <img src=../images/Excels-icons.png title="Xuất ra Excel"/>
                      </asp:LinkButton>
                   &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
                   &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</td>
                  </tr>
                <tr>
                    <td colspan="2" style="border-top:none 0px none">
                        <asp:GridView ID="GrvChuyen" runat="server" AutoGenerateColumns="False" 
                      Width="100%" AllowPaging="True"
                     ForeColor="#333333">
                    <RowStyle BackColor="#EFF3FB" />
                    <Columns>
                        <asp:TemplateField>
                        <ItemTemplate>
                        <center>
                            <asp:CheckBox ID="Chon" runat="server" />
                            </center>
                        </ItemTemplate>
                        </asp:TemplateField>
                     <asp:TemplateField HeaderText="STT">
                         <ItemTemplate><center><%# Container.DataItemIndex + 1 %></center></ItemTemplate>
                         </asp:TemplateField>
                         <asp:TemplateField HeaderText="Tên học sinh">
                         <ItemTemplate><asp:Label runat="server" ID="lblMaHS" Visible="false" Text='<%#Bind("MaHS")%>'></asp:Label>
                         <%#Eval("TenHS") %>
                         </ItemTemplate>
                         </asp:TemplateField>
                    </Columns>
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                </asp:GridView>
                    </td>
                </tr>        
            </table>
        </div>
      </div>
                      </ContentTemplate>
                      </asp:TabPanel>
                 </asp:TabContainer>
               </ContentTemplate>
            </asp:UpdatePanel>
            </div>
        </div>
 </div>
</asp:Content>

